export const makeMockData = (pageIndex, pageSize, tatal) => {
  // 假设一个数据总条数
  const TOTAL_RECORDS = tatal || 56;
  const leftCount = TOTAL_RECORDS - pageSize * (pageIndex - 1);
  const count = leftCount < 0 ? 0 : leftCount < pageSize ? leftCount : pageSize;
  const _list = new Array(count).fill('');

  return {
    List: _list.map((n, i) => {
      return {
        id: `${pageIndex}-${i}`,
        description: `【${pageSize * (pageIndex - 1) + i + 1}】这是第 ${pageIndex} 页的第 ${i + 1} 条数据`,
      };
    }),
    Total: TOTAL_RECORDS,
  };
};
